Skip to content

Track the public API surface#356

Merged
thomhurst merged 2 commits into
mainfrom
agent/public-api-analyzers
Jul 21, 2026
Merged

Track the public API surface#356
thomhurst merged 2 commits into
mainfrom
agent/public-api-analyzers

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • add Microsoft.CodeAnalysis.PublicApiAnalyzers 5.6.0 to the library on every target framework
  • seed PublicAPI.Shipped.txt with the current v4 surface and leave PublicAPI.Unshipped.txt ready for future changes
  • fail builds on undeclared additions (RS0016) and removals (RS0017)
  • document the intentional API-change workflow in CONTRIBUTING.md

Validation

  • dotnet build --no-incremental reports zero PublicApiAnalyzer diagnostics across net8.0, net9.0, and net10.0
  • temporary undeclared API probe fails the build with RS0016
  • temporary missing shipped API probe fails the build with RS0017
  • dotnet test: 1,611 tests passed across all three target frameworks

Closes #340

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds automated tracking for the library's public API surface. The main changes are:

  • Adds Microsoft.CodeAnalysis.PublicApiAnalyzers to every target framework.
  • Treats undeclared API additions and removals as build errors.
  • Seeds the shipped API baseline and creates an empty unshipped baseline.
  • Documents the workflow for intentional public API changes.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
EnumerableAsyncProcessor/EnumerableAsyncProcessor.csproj Configures the analyzer, baseline inputs, and API diagnostic handling.
EnumerableAsyncProcessor/PublicAPI.Shipped.txt Records the library's current public API surface.
EnumerableAsyncProcessor/PublicAPI.Unshipped.txt Creates the baseline file for future unreleased API changes.
CONTRIBUTING.md Documents how contributors should record and approve public API changes.

Reviews (6): Last reviewed commit: "fix: sync public API baseline (#356)" | Re-trigger Greptile

@thomhurst
thomhurst force-pushed the agent/public-api-analyzers branch from 8cca754 to e88071b Compare July 21, 2026 19:51
thomhurst added a commit that referenced this pull request Jul 21, 2026
thomhurst added a commit that referenced this pull request Jul 21, 2026
@thomhurst
thomhurst force-pushed the agent/public-api-analyzers branch from 955ebc8 to 43c142a Compare July 21, 2026 20:01
thomhurst added a commit that referenced this pull request Jul 21, 2026
@thomhurst
thomhurst force-pushed the agent/public-api-analyzers branch from 43c142a to cc8f390 Compare July 21, 2026 20:04
@thomhurst
thomhurst force-pushed the agent/public-api-analyzers branch from cc8f390 to 601201d Compare July 21, 2026 20:08
@thomhurst
thomhurst merged commit c5a1054 into main Jul 21, 2026
5 checks passed
@thomhurst
thomhurst deleted the agent/public-api-analyzers branch July 21, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt Microsoft.CodeAnalysis.PublicApiAnalyzers to track the public API surface

1 participant